package com.itheima.mRadix.demo;

public class MyCode1 {
    public static void main(String[] args) {
    int[] br = {11,22,33,44};
    exChange(br);
    }


    public static void exChange(int[] arr) {
        //数组反转
        int start = 0;
        int end = arr.length - 1;
        while (start < end) {
         /*   int temp = arr[start];
            arr[start] = arr[end];
            arr[end] = temp;*/
            arr[start] = arr[start]^arr[end];
            arr[end] =arr[start]^arr[end];
            arr[start] = arr[start]^arr[end];
            start++;
            end--;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}